﻿Imports DTO
Imports System.Data
Imports System.Data.SqlClient
Public Class TaiKhoanDAO
    Public Function GetList() As List(Of TaiKhoanDTO)
        Dim ds As List(Of TaiKhoanDTO) = New List(Of TaiKhoanDTO)
        Dim sql = "select MaTK from TaiKhoan"
        Dim cn As SqlConnection = DataProviders.ConnectDB()
        Dim da As SqlCommand = New SqlCommand(sql, cn)
        Dim dr As SqlDataReader
        dr = da.ExecuteReader()
        While dr.Read()
            Dim tk As New TaiKhoanDTO()
            tk.MaTK = dr("MaTK")
            ds.Add(tk)
        End While
        dr.Close()
        cn.Close()
        Return ds
    End Function
End Class
